/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.schedul.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
import com.thinkgem.jeesite.modules.shift.entity.Shift;
import com.thinkgem.jeesite.modules.sys.entity.Office;

/**
 * 员工排班表Entity
 * @author pan.zhou
 * @version 2017-07-15
 */
public class SchedulingInformation extends DataEntity<SchedulingInformation> {
	
	private static final long serialVersionUID = 1L;
	private String employeeNumber;		// 员工编号
	private String employeeName;		// 员工名称
	private Date starttime;		// 开始日期
	private Date endtime;		// 结束日期
	private Shift shift;		//班次
	private String schclassName;    //名称
	private Office company;        // 归属公司 ,国家
	private Office office;         // 归属部门,仓库
	private String oldShiftId;		//原来班次ID
	
	public SchedulingInformation() {
		super();
	}

	public SchedulingInformation(String id){
		super(id);
	}

	public SchedulingInformation(String employeeNumer, Date starttime, Date endtime, String delFlag) {
		this.employeeNumber = employeeNumer;
		this.starttime = starttime;
		this.endtime = endtime;
		this.delFlag = delFlag;
	}

	@Length(min=1, max=64, message="员工编号长度必须介于 1 和 64 之间")
	public String getEmployeeNumber() {
		return employeeNumber;
	}

	public void setEmployeeNumber(String employeeNumber) {
		this.employeeNumber = employeeNumber;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="开始日期不能为空")
	public Date getStarttime() {
		return starttime;
	}

	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="结束日期不能为空")
	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}
	
	
	
	@JsonIgnore
    @NotNull(message="归属公司不能为空")
    @ExcelField(title="归属公司", align=2, sort=20)
    public Office getCompany() {
        return company;
    }

    public void setCompany(Office company) {
        this.company = company;
    }
    
    @JsonIgnore
    @NotNull(message="归属部门不能为空")
    @ExcelField(title="归属部门", align=2, sort=25)
    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }
    public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	public String getSchclassName() {
		return schclassName;
	}

	public void setSchclassName(String schclassName) {
		this.schclassName = schclassName;
	}
	@NotNull(message="班次不能为空")
	public Shift getShift() {
		return shift;
	}

	public void setShift(Shift shift) {
		this.shift = shift;
	}
	public String getOldShiftId() {
		return oldShiftId;
	}

	public void setOldShiftId(String oldShiftId) {
		this.oldShiftId = oldShiftId;
	}
}